{% extends "base.html" %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">新增结算记录</h4>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label class="form-label">订单号</label>
                            <input type="text" class="form-control" name="order_id" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">客户名称</label>
                            <input type="text" class="form-control" name="customer_name" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">结算金额</label>
                            <div class="input-group">
                                <span class="input-group-text">¥</span>
                                <input type="number" class="form-control" name="amount" step="0.01" min="0" required>
                            </div>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">结算类型</label>
                            <select class="form-select" name="settlement_type" required>
                                <option value="order">订单结算</option>
                                <option value="service">服务结算</option>
                                <option value="transport">运输结算</option>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">支付方式</label>
                            <select class="form-select" name="payment_method">
                                <option value="">请选择支付方式</option>
                                <option value="cash">现金</option>
                                <option value="bank_transfer">银行转账</option>
                                <option value="alipay">支付宝</option>
                                <option value="wechat">微信支付</option>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">备注</label>
                            <textarea class="form-control" name="notes" rows="3"></textarea>
                        </div>
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary">提交</button>
                            <a href="{{ url_for('finance.settlement_list') }}" class="btn btn-secondary">返回列表</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 